/*
 * Wazuh databaseFeedManager
 * Copyright (C) 2015, Wazuh Inc.
 * May 7, 2024.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */
#ifndef _TRAMPOLINE_REMEDIATION_DATA_CACHE_HPP
#define _TRAMPOLINE_REMEDIATION_DATA_CACHE_HPP

#include "MockRemediationDataCache.hpp"
#include "singleton.hpp"

#include "json.hpp"

extern std::shared_ptr<MockRemediationDataCache> spRemediationDataCacheMock;

/**
 * @brief This class is a wrapper of the trampoline content register library.
 */
class TrampolineRemediationDataCache final : public Singleton<TrampolineRemediationDataCache>
{
public:
    /**
     * @brief Constructor for creating a TrampolineRemediationDataCache object.
     *
     * The `TrampolineRemediationDataCache` constructor initializes a new instance of the
     * TrampolineRemediationDataCache class.
     */
    TrampolineRemediationDataCache() {};

    virtual ~TrampolineRemediationDataCache() = default;

    /**
     * @brief Trampoline to method getRemediationData.
     *
     * @param agentId
     *
     * @return Remediation
     */
    Remediation getRemediationData(const std::string& agentId)
    {
        return spRemediationDataCacheMock->getRemediationData(agentId);
    }

    /**
     * @brief Trampoline to method addRemediationData.
     *
     * @param agentId
     * @param newRemediationData
     */
    void addRemediationData(const std::string& agentId, const Remediation& newRemediationData)
    {
        spRemediationDataCacheMock->addRemediationData(agentId, newRemediationData);
    }
};

#endif //_TRAMPOLINE_REMEDIATION_DATA_CACHE_HPP
